Strict

Import agfx


Global myTmpScreen:TTmpScreen

Class TAgfx_test_app Extends TFramework

	Method OnCreate:Int()
		
		'DEVICE.SetFps(20)		' default FPS is 60
		
		Super.OnCreate()
				
		DISPLAY.SetVirtualSize(320,480)
		
		myTmpScreen = New TTmpScreen		
		myTmpScreen.Prepare()
		
		Return 0
	End
	
End


Class TTmpScreen Extends TScreen
	
	Field MyFont1:TFont
	Field MyFont2:TFont
	
	' START when app is created
	Method Start:Void()
		Self.MyFont1 = New TFont()
		Self.MyFont2 = New TFont()
		

		FONTS.Load("fixedsys_12")		
		FONTS.Load("casual")

		MyFont1 = FONTS.Find("casual")
		MyFont2 = FONTS.Find("fixedsys_12")
		
		
	End
	
	' main app logic loop update
	Method Update:Void()
		
	End
	
	' main app render loop
	Method Render:Void()
		SetColor 80,80,80
		Cls
		SetColor 80,80,80
		DrawRect(0,0,250,250)
		SetColor(255,255,255)
		FONTS.Find("fixedsys_12").DrawText(FPS(),4,4) 'will works in 1.39
		
		'Self.MyFont2.DrawText("Fps: "+FPS.Get(),1,1,0)
		Self.MyFont1.DrawText("Casual Font",100,100,45)
	End
End






